package com.guyaogg.gulimall.product.feign;

import com.guyaogg.common.to.SkuHasStockVO;
import com.guyaogg.common.utils.ToT;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * # @FeignClient("gulimall-gateway") 名称不能重复
 * @author 顾遥
 */
@FeignClient("gulimall-gateway")
@RequestMapping("/api/ware/waresku")
public interface WareFeignService {

    /**
     * 1.R 设计时候 加入泛型
     * 2.直接返回想要的结果
     * 3.自己封装解析结果
     * @param skuIds
     * @return
     */
    @PostMapping("/hasstock")
    //@RequiresPermissions("ware:waresku:list")
    ToT<List<SkuHasStockVO>> getSkusHasStock(@RequestBody List<Long> skuIds);
}
